home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / penmap_ic.doc < prev    next >
Text File  |  1999-10-30  |  6KB  |  193 lines

  1. TABLE OF CONTENTS
  2.  
  3. penmap_ic/--datasheet--
  4. penmap_ic/PENMAP_GetClass
  5. penmap_ic/--datasheet--                           penmap_ic/--datasheet--
  6.  
  7.     NAME
  8.         penmap_ic -- create penmap BOOPSI objects
  9.  
  10.     SUPERCLASS
  11.         imageclass
  12.  
  13.     REQUIRES
  14.         None.
  15.  
  16.     DESCRIPTION
  17.         This class will yield color remapped images on any public screen.
  18.         It also supports bitmap scaling. If used with V39 or or greater
  19.         of AmigaOS it can take advantage of pen sharing.
  20.  
  21.     METHODS
  22.         OM_NEW -- Create the penmap image.  Passed to superclass,
  23.             then OM_SET.
  24.  
  25.         OM_GET -- Get object attributes.  Passed to superclass first.
  26.  
  27.         OM_SET -- Set object attributes.  Passed to superclass first.
  28.  
  29.         OM_UPDATE -- Set object notification attributes.  Passed to
  30.             superclass first.
  31.  
  32.         IM_DRAW -- Renders the image. Supports IDS_NORMAL and
  33.             IDS_SELECTED drawing states, and does not require
  34.             a DrawInfo structure. The graphics.library function
  35.             BitMapScale () to scale the image if required.
  36.  
  37.         IM_DRAWFRAME -- Renders the image scaled to the frame size
  38.             specified. Supports IDS_NORMAL and IDS_SELECTED drawing
  39.             states, and does not require a DrawInfo structure.
  40.             The graphics.library function BitMapScale () to scale
  41.             the image.
  42.  
  43.         IM_HITFRAME -- Asks the object if a point would be inside it
  44.             if the object was confined (scaled) to the given
  45.             rectangular bounds. Returns TRUE if the given point would
  46.             be inside the object, otherwise FALSE.
  47.  
  48.         IM_ERASEFRAME -- Erase the object using the rectangular
  49.             frame size.
  50.  
  51.         All other methods are passed to the superclass, including OM_DISPOSE.
  52.  
  53.     ATTRIBUTES
  54.  
  55.         IA_Left (WORD)
  56.         IA_Top (WORD)
  57.             Set starting position/offset of image.
  58.             Defaults to 0.
  59.  
  60.            (Applicability is OM_NEW, OM_SET, OM_GET)
  61.  
  62.         IA_Width (WORD)
  63.         IA_Height (WORD)
  64.             Set size of the image, scaling via BitMapScale() if different
  65.             from the chunky image data size.
  66.  
  67.             Defaults to width and height of IA_Data.
  68.  
  69.            (Applicability is OM_NEW, OM_SET, OM_GET)
  70.  
  71.         IA_BGPen 
  72.             Specify background pen of a normal image.
  73.  
  74.             Defaults to BACKGROUNDPEN of the screen passed in PENMAP_Screen.
  75.  
  76.            (Applicability is OM_NEW, OM_SET, OM_GET)
  77.  
  78.         IA_Pens
  79.             Sets the pens which the values in the data array represents.
  80.  
  81.            (Applicability is OM_NEW, OM_GET)
  82.  
  83.         IA_Data
  84.            Chunky format image data for normal render.
  85.            
  86.            The data format is a UBYTE array of chunky pen numbers.
  87.            Note this data must be WORD aligned, as the first 4 bytes
  88.            are accessed as two WORDs which specify the width and
  89.            height of the following chunky image data.
  90.  
  91.            Defaults to NULL.
  92.  
  93.            (Applicability is OM_NEW, OM_SET)
  94.  
  95.         PENMAP_SelectedData
  96.            Chunky format image data for selected image render.
  97.  
  98.            (Applicability is OM_NEW, OM_SET)
  99.  
  100.         PENMAP_Palette
  101.            An array of ULONG describing the palette for the picture.
  102.            If you are obtaining pens yourself, you should only pass the
  103.            IA_Pens attribute at object creation time.
  104.  
  105.            The format of the array is:
  106.  
  107.            ULONG palette[] =
  108.            {
  109.                number_triplets,
  110.                red1, green1, blue1,
  111.                red2, green2, blue2,
  112.                ...
  113.            };
  114.  
  115.            (Applicability is OM_NEW, OM_GET)
  116.  
  117.         PENMAP_Screen (struct Screen *)
  118.             Pointer to the screen to use image on. This attribute MUST
  119.             be provided when creating an object of this class.
  120.  
  121.            Defaults to NULL.
  122.  
  123.            (Applicability is OM_NEW, OM_GET)
  124.  
  125.         PENMAP_Transparent (BOOL)
  126.            Remaps chunky pen 0 to the BACKGROUNDPEN.
  127.  
  128.            Defaults to FALSE.
  129.  
  130.            (Applicability is OM_NEW, OM_SET)
  131.  
  132.         PENMAP_Precision
  133.             Set the precision for ObtainBestPen() when penmap is used
  134.             under AmigaOS 3.0 or later. See the ObtainBestPen autodoc
  135.             for more details.
  136.             
  137.             Defaults to PRECISION_IMAGE.
  138.  
  139.             Applicability is (OM_NEW, OM_SET)
  140.  
  141.         PENMAP_ColorMap (struct ColorMap *)
  142.             Pointer to a colormap to use in obtaining best matching pens.
  143.             This tag or, PENMAP_Screen must be provided when creating an
  144.             object of this class. If PENMAP_Screen is passed, penmap will
  145.             use Screen->ViewPort.ColorMap.
  146.  
  147.            Defaults to NULL.
  148.  
  149.            (Applicability is OM_NEW, OM_GET)
  150.  
  151.         PENMAP_MaskBlit (BOOL)
  152.            Causes penmap to render on screen using a mask plane. This
  153.            mask plane is created dynamically by the class.
  154.  
  155.            The mask is created by OR'ing the source bitplanes in to a single
  156.            mask plane using some nifty blitting techniques. This tag should
  157.            be used if penmap objects are used in a layout group that may
  158.            contain a user or program specified backfill. This will allow the
  159.            backfill pattern to flow around the image, making it transparent.
  160.  
  161.            Defaults to FALSE.
  162.  
  163.            (Applicability is OM_NEW, OM_SET)
  164. penmap_ic/PENMAP_GetClass                   penmap_ic/PENMAP_GetClass
  165.  
  166.     NAME
  167.         PENMAP_GetClass -- Gets the pointer to the penmap class.
  168.  
  169.     SYNOPSIS
  170.         penmap_class = PENMAP_GetClass();
  171.         D0
  172.  
  173.         Class * PENMAP_GetClass(VOID);
  174.  
  175.     FUNCTION
  176.         Obtains the pointer to the PenMap image class for use with
  177.         NewObject().  This function always returns a valid pointer so
  178.         you do not need to check it.  The reason is that if the library
  179.         opens fine, then the pointer returned is already setup.  (Of course
  180.         this implies that if opening the library fails, you shouldn't be
  181.         calling this.)
  182.  
  183.         Note that this function does not create the class, that is done
  184.         when the class library is opened.
  185.  
  186.     INPUTS
  187.         Nothing.
  188.  
  189.     RESULT
  190.         penmap_class - Pointer to the PenMap image class.
  191.  
  192.     SEE ALSO
  193.